home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / N7FIHU (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.1 KB  |  31 lines

  1. package com.sun.java.swing.plaf;
  2.  
  3. import com.sun.java.swing.Icon;
  4. import java.awt.Component;
  5. import java.awt.Graphics;
  6. import java.io.Serializable;
  7.  
  8. public class IconUIResource implements Icon, UIResource, Serializable {
  9.    private Icon delegate;
  10.  
  11.    public IconUIResource(Icon delegate) {
  12.       if (delegate == null) {
  13.          throw new IllegalArgumentException("null delegate icon argument");
  14.       } else {
  15.          this.delegate = delegate;
  16.       }
  17.    }
  18.  
  19.    public int getIconHeight() {
  20.       return this.delegate.getIconHeight();
  21.    }
  22.  
  23.    public int getIconWidth() {
  24.       return this.delegate.getIconWidth();
  25.    }
  26.  
  27.    public void paintIcon(Component c, Graphics g, int x, int y) {
  28.       this.delegate.paintIcon(c, g, x, y);
  29.    }
  30. }
  31.